// 处理原数组中是否包含另一个数组活对象，并取出在原数组中的下标

function includes(oldArr,data){
  let arr = [];
  if(data.constructor == Array){
    for(let i = 0; i < data.length; i++){
      for(let j = 0; j < oldArr.length; j++){
        if(data[i].size == oldArr[j].size){
          arr.push(j)
        }
      }
    }
  }else if(data.constructor == Object){
    for(let i = 0; i < oldArr.length; i++){
      if(data.size == oldArr[i].size){
        arr.push(i)
      }
    }
  }
  return arr;
}

module.exports = includes;
